package org.example.service.impl;


import org.aspectj.weaver.ast.Var;
import org.example.mapper.UserMapper;
import org.example.mapper.VarMapper;
import org.example.pojo.User;
import org.example.pojo.Variable;
import org.example.service.UserService;
import org.example.service.VarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VarServiceImpl implements VarService {

    @Autowired  //注入的是代理对象的实例
    private VarMapper varMapper;

    @Override
    public List<Variable> selectVariables(){
        return varMapper.selectVariables();
    }



    @Override
    public int deleteVar(int vId) {
        return  varMapper.deleteVar(vId);
    }

    @Override
    public int insertVar(Variable variable) {
        return varMapper.insertVar(variable);
    }

    @Override
    public List<Variable> selectVariablesByAll(String var) {
        return varMapper.selectVariablesByAll(var);
    }
}
